<?php
namespace API\Controller;
use Think\Controller;
class CourseServiceController extends Controller {
    public function getCourseById(){
        $c_id = $_GET['c_id'];
        $courses = M('courses');
     	$data = $courses -> where("c_id='$c_id'")-> select();	

        echo json_encode($data);
         echo "<br>";

    }
     public function getAllCourses(){


        $courses = M('courses');
        $data = $courses -> order("c_id")->select();

        echo json_encode($data);
         echo "<br>";

    }
}
?>
